#include "includes.h"



int main(void){
	
	unsigned short adc_result;
	unsigned short sample1,sample2,sample3,sample4;
	DDRB = 0xff;
	PORTB = 0x00;
	
	
	adc_init(0);
	
	
	while(1){
	
	sample1= adc_read();
	_delay_ms(10);
	sample2= adc_read();
	_delay_ms(10);
	sample3= adc_read();
	
	if(sample1>sample2&&sample2>sample3&&sample3>sample4) PORTB = 0xff;
	else PORTB = 0x00;
	_delay_ms(10);
	}
    return 0;
}
